<div style="display:none;" class="content__title">
    <h1>
        登陆
    </h1>
</div>
<form nz-form [formGroup]="form" role="form">
    <nz-tabset [nzAnimated]="false" class="tabs" (nzSelectChange)="switch($event)">
        <nz-tab>
            <ng-template #nzTabHeading>账户密码登录</ng-template>
            <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
            <div nz-form-item>
                <div nz-form-control [nzValidateStatus]="userName">
                    <nz-input formControlName="userName" [nzPlaceHolder]="''" [nzSize]="'large'">
                        <ng-template #prefix>
                            <i class="anticon anticon-user"></i>
                        </ng-template>
                    </nz-input>
                    <ng-container *ngIf="userName.dirty || userName.touched">
                        <p nz-form-explain *ngIf="userName.errors?.required">请输入账户名！</p>
                        <p nz-form-explain *ngIf="userName.errors?.minlength">至少五个字符</p>
                    </ng-container>
                </div>
            </div>
            <div nz-form-item>
                <div nz-form-control [nzValidateStatus]="password">
                    <nz-input formControlName="password" [nzPlaceHolder]="''" [nzType]="'password'" [nzSize]="'large'">
                        <ng-template #prefix>
                            <i class="anticon anticon-lock"></i>
                        </ng-template>
                    </nz-input>
                    <div nz-form-explain *ngIf="(password.dirty || password.touched) && password.errors?.required">请输入密码！</div>
                </div>
            </div>
        </nz-tab>

    </nz-tabset>
    <div nz-form-item nz-row>
    </div>
    <div nz-form-item>

        <button nz-button [nzType]="'primary'" (click)="submit()" [nzSize]="'large'" [nzLoading]="loading">
            <span>登录</span>
        </button>
        <button nz-button [nzType]="'default'" (click)="initSystemEnv()" [nzSize]="'large'">
            <span>初始化</span>
        </button>
    </div>
</form>
<div class="other">
</div>